You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR fixes a swaps token-info navigation bug where tapping the info icon in the token selector could open the wrong asset details screen.
Root cause:
In BridgeTokenSelector, info-icon navigation used navigate('Asset', params).
When swaps was entered from an existing asset details route, React Navigation could reuse that existing Asset route instance, resulting in stale params (the entry token) instead of the tapped token.
Fix:
Switched info-icon navigation to navigation.dispatch(StackActions.push('Asset', params)) so a fresh Asset route is always created with the tapped token params.
Kept analytics tracking behavior unchanged.
Updated unit test assertions to validate a PUSH action with correct token params.
Changelog
CHANGELOG entry: Fixed a bug where tapping a token’s info icon in Swaps could open the wrong asset details page.
Related issues
Fixes: SWAPS-4107
Manual testing steps
Feature: Swaps token info navigation opens correct asset detailsScenario: Open swaps from asset details and inspect another tokenGiven I am on any token asset details page
When I tap "Swap"And I open the token selector
And I tap the info icon for a different token
Then the asset details page opens for the tapped token
And not for the original token I started from
Scenario: Open swaps from a non-asset-details entrypointGiven I open swaps from home/wallet actions
When I open the token selector
And I tap the info icon for a token
Then the asset details page opens for that tapped token
Screenshots/Recordings
Before
Behavior reproduced in Jira recording attached to SWAPS-4107 (wrong token details opened).
After
Pending fresh verification recording showing tapped token details open correctly on iOS and Android.
I've completed the PR template to the best of my ability
I've included tests if applicable
I've documented my code using JSDoc format if applicable
I've applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
Pre-merge reviewer checklist
I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
Selected Performance tags: None (no tests recommended)
Risk Level: low
AI Confidence: 90%
click to see 🤖 AI reasoning details
E2E Test Selection:
The changes are in the BridgeTokenSelector component, which is part of the Bridge feature. The modification changes navigation behavior from navigation.navigate('Asset') to navigation.dispatch(StackActions.push('Asset')) to ensure a fresh Asset route is always pushed instead of potentially reusing an existing route with stale params. This is a targeted navigation fix with corresponding test updates. SmokeTrade is selected because it covers cross-chain bridging functionality. SmokeConfirmations is included as per the tag guidance that bridge flows require confirmations testing.
Performance Test Selection:
This change is purely a navigation stack management fix (using push instead of navigate). It does not affect UI rendering, data loading, or any performance-sensitive operations. No performance tests are needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes a swaps token-info navigation bug where tapping the info icon in the token selector could open the wrong asset details screen.
Root cause:
BridgeTokenSelector, info-icon navigation usednavigate('Asset', params).Assetroute instance, resulting in stale params (the entry token) instead of the tapped token.Fix:
navigation.dispatch(StackActions.push('Asset', params))so a freshAssetroute is always created with the tapped token params.PUSHaction with correct token params.Changelog
CHANGELOG entry: Fixed a bug where tapping a token’s info icon in Swaps could open the wrong asset details page.
Related issues
Fixes: SWAPS-4107
Manual testing steps
Screenshots/Recordings
Before
Behavior reproduced in Jira recording attached to
SWAPS-4107(wrong token details opened).After
Pending fresh verification recording showing tapped token details open correctly on iOS and Android.
Pre-merge author checklist
Pre-merge reviewer checklist